let hasInit = false
let env = 'develop' // develop、trial、release

function initEnv () {
  const accountInfo = wx.getAccountInfoSync()
  env = accountInfo.miniProgram.envVersion
  return env
}

function getEnv () {
  if (!hasInit) {
    initEnv()
  }
  return env
}

export {
  initEnv,
  getEnv
}